package com.lysj.merchant.desk.domain;

import com.lysj.admin.utils.spring.foundation.base.BaseEntity;
import com.lysj.admin.utils.validation.annotation.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;

/**
 * @author Created by drj on 2019-03-07 14:35:25
 * @description 餐桌控制层
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@Table(name = "lysj_merchant_desk_desk")
public class Desk extends BaseEntity {
    @Getter
    public enum Status {
        FREE(1, "空闲"),
        LOCK(2, "锁定"),
        REPAST(3, "就餐");
        private Integer code;

        private String status;

        Status(Integer code, String status) {
            this.code = code;
            this.status = status;
        }
    }

    @NotBlank(message = "桌台编号不能为空")
    private String name;
    private String deskRoomId;//餐桌位置
    private String deskTypeId;//餐桌类型
    private String storeId; //门店id
    @Column(columnDefinition = "decimal(10,2)")
    private BigDecimal minMoney;//最低消费
    private Integer status;//餐桌状态

    private Integer cusNumber;//用餐人数

    private String customerId; //用户id,餐桌锁定时绑定,支付成功后释放


}